<template>
  <div class="home">
    <Top />
    <Swipe />
    <indexFour />

    <indexThree />
    <indexOne />
    <NavBar />
    <!-- <keep-alive>
    <component :is="Goods" />
  </keep-alive> -->
    <Goods />
  </div>
</template>
<script>
import NavBar from "@/components/home/NavBar";
import Top from "@/components/home/top";
import Swipe from "@/components/home/swipe";
import indexOne from "@/components/activity/indexOne";
import indexThree from "@/components/activity/indexThree";
import indexFour from "@/components/activity/indexFour";
import Goods from "@/components/home/goods";
import { onActivated, onDeactivated } from "vue";
export default {
  components: {
    NavBar,
    Top,
    Swipe,
    Goods,
    indexOne,
    indexThree,
    indexFour,
  },
  setup() {
    let scrollTop = 0;
    onActivated(() => {
      // document.getElementById("app").addEventListener("scroll", () => {
      // });
      document.getElementById("app").scrollTop = scrollTop;
    });
    onDeactivated(() => {
      scrollTop = document.getElementById("app").scrollTop;
    });
    return { Goods };
  },
};
</script>
<style lang="scss" scoped>
.home {
  background: #f7f7f7;
}
.notice-swipe {
  height: 40px;
  line-height: 40px;
}
</style>
